package com.sea.supply.service.impl;

import com.sea.supply.entity.DistributeSku;
import com.sea.supply.entity.Produce;
import com.sea.supply.mapper.DistributeSkuMapper;
import com.sea.supply.mapper.ProduceMapper;
import com.sea.supply.service.DistributeSkuService;

import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.InputStream;
import java.util.List;

@Service
public class DistributeSkuServiceImpl implements DistributeSkuService {

    @Autowired
    private DistributeSkuMapper distributeSkuMapper;
    @Autowired
    private ProduceMapper produceMapper;

    @Override
    public int save(DistributeSku distributeSku) {
        return distributeSkuMapper.insert(distributeSku);
    }

    @Override
    public List<DistributeSku> findDistributeNumber(String orderSku, String orderChannelName) {
        return distributeSkuMapper.findDistributeNumber(orderSku, orderChannelName);
    }

    @Override
    public List<DistributeSku> findByPlanId(Integer planId) {
        return distributeSkuMapper.findByPlanId(planId);
    }

    @Override
    public Integer deleteByPlanId(Integer planId) {
        return distributeSkuMapper.deleteByPlanId(planId);
    }


}
